# New ASM File

test_combat_menu:
.asciiz "\nWhat would you like to do?\n1. Delay\n2. Deflect Criticism\n3. Confusion\n4. Invalidate"
test_attackone:
.asciiz "\nYour enemy is suddenly delayed and unable to attack this turn."
test_attacktwo:
.asciiz "\nYou deftly shift blame to others, allowing you to recuperate."
test_attackthree:
.asciiz "\nYou confuse your enemy. In its confusion, the enemy hurts itself."
test_attackfour:
.asciiz "\nYou invalidate the enemy's design, causing heavy damage."


test_basehealing_two:
.word 0x00000001
test_hitchance_three:
.word 0x00000001
test_basedamage_three:
.word 0x00000001
test_hitchance_four:
.word 0x00000001
test_basedamage_four:
.word 0x00000001

test_combat_select:
	li $a0, test_combat_menu
	jal libplp_uart_write_string
	nop
	jal libplp_uart_read
	nop
	move $t0, $v0
	li $t1, 0x00000031
	beq $t0, $t1, test_attack_one
	nop
	li $t1, 0x00000032
	beq $t0, $t1, test_attack_two
	nop
	li $t1, 0x00000033
	beq $t0, $t1, test_attack_three
	nop
	li $t1, 0x00000034
	beq $t0, $t1, test_attack_four
	nop
	# idiot didnt enter 1-4, do it again
	j test_combat_select
	nop

test_attack_one:
	li $a0, test_attackone
	jal libplp_uart_write_string
	nop
	#skip enemy turn
	j test_combat_select
	nop
test_attack_two:
	li $a0, test_attacktwo
	jal libplp_uart_write_string
	nop
	# load base healing
	li $t4, test_basehealing_two
	lw $s3, 0($t4)
	j player_heal
	nop
test_attack_three:
	li $a0, test_attackthree
	jal libplp_uart_write_string
	nop
	# load specific attack values
	li $t4, test_hitchance_three
	lw $s4, 0($t4)
	li $t4, test_basedamage_three
	lw $s3, 0($t4)
	j player_hit
	nop
test_attack_four:
	li $a0, test_attackfour
	jal libplp_uart_write_string
	nop
	# load specific attack values
	li $t4, test_hitchance_four
	lw $s4, 0($t4)
	li $t4, test_basedamage_four
	lw $s3, 0($t4)
	j player_hit
	nop
